<template>
	<view class="center">
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15">
			<text>员工姓名</text>
			<text>{{userInfo.staffName}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15">
			<text>员工工号</text>
			<text>{{userInfo.staffNo}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15 ">
			<text>手机号码</text>
			<text>{{userInfo.phone}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15 ">
			<text>所属部门</text>
			<text>{{userInfo.deptName}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15">
			<text>职位/岗位</text>
			<text>{{userInfo.positionName}}/{{userInfo.workTypeName}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15">
			<text>入职时间</text>
			<text>{{userInfo.entryTime}}</text>
		</view>
		<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15 ">
			<text>转正时间</text>
			<text>{{userInfo.regularTime}}</text>
		</view>
	<!-- 	<view class="flex flex-a-center  flex-j-between bottom-border-solid p-15 ">
			<text>司龄</text>
			<text>{{userInfo.siLing}}</text>
		</view> -->
	</view>
</template>

<script>
	import {getUsersByID} from "./api";
	import { useRequest } from "v3hooks";
		export default {  
			data() {  
				return {  
					textvalue:"",  
					userInfo:{}
				};  
			},  
			onLoad(v) { 
				this.aa(v.id)
			},  
			methods: {  
				 async aa(id){
					 await getUsersByID(id).then(res=>{
						 this.userInfo = res.data;
					 });
				 }
			}  
		}  
</script>

<style lang="scss" scoped>
	view {
		font-size: $uni-font-size-sm;
	}

	.center {
		flex-direction: column;
	}
</style>
